<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //将数据转化为数字类型
        console.log(parseInt('123.1'));
        console.log(parseFloat('123.1'));
        //将数字转化为字符串
        console.log(123.1.toString());
        console.log(Number('123.1'));
        console.log(Number('123.a'));
        console.log(123..toString());
        console.log((123).toString());
        console.log(+'123.1');
        console.log('123' - 0);//隐式转换
        console.log('123' * 1);//隐式转换
        console.log('123' / 1);//隐式转换
    </script>
</body>

</html>